//
//  String+Extension.swift
//  rxCoreLogic
//
//  Created by yq on 2021/2/5.
//

import Foundation

extension String {
	
	/// 是否匹配
	///
	/// - Parameter regex: 正则表达式
	/// - Returns: Bool
	public func isMatching(_ regex: String) -> Bool {
		return NSPredicate(format: "SELF MATCHES %@", regex).evaluate(with: self)
	}
	
	
}
